home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today - The Disc! 5
/
CD-ROM Today - The Disc (Issue 5)(November 1994).ISO
/
mac
/
Mac shareware
/
Education
/
RLaB
/
help
/
diag
< prev
next >
Wrap
Text File
|
1994-09-21
|
533b
|
21 lines
diag:
Syntax: diag ( A )
diag ( A , K )
Description:
If the 1st argument is a 1xN matrix construct a diagonal
matrix from the input . Optionally if K (scalar) is specified
then create a matrix with the vector as the Kth diagonal.
If the 1st argument is a MxN matrix, construct a 1xN matrix
from the diagonal elements of the input matrix. Optionally if
K is specified return the vector from the Kth diagonal of the
input matrix.
K < 0 is below the main diagonal.
K > 0 is above the main diagonal.
See Also: tril, triu